package com.android.nativ;

import android.content.Context;
import android.telephony.TelephonyManager;
import android.util.Log;

public class SimCardChecker {
    private Context context;

    public SimCardChecker(Context context) {
        this.context = context;
    }

    public boolean hasSimCard() {
        TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        int simState = telephonyManager.getSimState();
        var result = simState != TelephonyManager.SIM_STATE_ABSENT;
        Log.d("NAVITE-INT","simState:"+simState + "\thasSimCard:" + result);
        return result;
    }
}